import UserInfo from "./info.json"
import list from "./page.json"
import detail from "./1.json"
import type {MockMethod} from 'vite-plugin-mock'
import success from "../success.json"
import login from "./login.json"
import verycode from "./verycode.json"

//const Mock = require('mockjs')

export default [
    {
        url: "/user/list",
        method: "post",
        response: ((query: any) => {
            return list;
        })
    },
    {
        url: "/user/detail",
        method: "get",
        response: (() => {
            return detail
        })
    },
    {
        url: "/user/userInfo",
        method: "post",
        response: (() => {
            return UserInfo;
        })
    },
    {
        url: "/user/save",
        method: "post",
        response: (() => {
            return detail;
        })
    },
    {
        url: "/user/delete/:id",
        method: "delete",
        response: (() => {
            return success;
        })
    },
    {
        url: "/user/delete",
        method: "post",
        response: (() => {
            return success;
        })
    },
    {
        url: "/user/changeState/:id",
        method: "post",
        response: (() => {
            return success;
        })
    },
    {
        url: "/user/login",
        method: "post",
        response: (() => {
            return login;
        })
    },
    {
        url: "/user/logout",
        method: "post",
        response: (() => {
            return login;
        })
    },
    {
        url: "/user/authcode",
        method: "get",
        response: (() => {
            return verycode;
        })
    }
] as MockMethod[]
